﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="HMS.PL.Forms.test" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Test Export</title>
    <script type="text/javascript" src="../Scripts/jquery-1.6.1.js"></script>
    <script type="text/javascript">

        $(document).ready(function () {
          //debugger;

            $("#btnExportExcel").click(function () {

                var list_id = 9;
                var arrColor = new Array("FloralWhite", "Aquamarine", "Beige", "CadetBlue", "Gainsboro", "WhiteSmoke", "MidnightBlue", "Burlywood", "Chocolate", "Coral");

                $.ajax({
                    async: false,
                    type: 'GET',
                    url: "MasterCallback.aspx?operation=GetRelDataGraph&Mlist_id=" + list_id,
                    data: "",
                    dataType: "json",
                    success: function (str) {
                        debugger;
                        alert("hh");
                        // var data = eval('(' + str + ')');
                        // alert("jj");
                        var arr = str1.split('^');
                        var str = arr[1];

                        $("#container_0").empty();
                        $("#container_0").attr("list_id", arr[0]);
                        // $("#tmplGraph").tmpl(str).appendTo("#container_0");

                        for (i = 0, len = str.length; i < len; i++) {
                            // debugger;
                            var strDiv = "<div id=" + str[i].rel_col + " class='div' style='background-color:" + arrColor[0] + ";' onclick='divClick(\"" + str[i].rel_col + "\");' ParentId='null'>" + str[i].show_col + "</div>";
                            $("#container_0").append(strDiv);
                            $('#' + str[i].rel_col).bind("dblclick", divClick);
                        }
                    },
                    error: function (x, e) {
                        debugger
                        alert(x.readyState + " " + x.status + " " + e.msg);
                    }
                });

            });

            //            var dim_data = BindCombo("bind_master", "", "drp_mstdash", "master", true);
            function CheckAllCheckBoxListOption() {

                var checkBoxList = document.getElementById("CheckBoxList1");
                if (checkBoxList != null) {
                    var chkCheckBoxListItems = checkBoxList.getElementsByTagName("input");
                    for (var intCounter = 0; intCounter <= chkCheckBoxListItems.lenght - 1; ) {
                        if (chkCheckBoxListItems[intCounter].checked)
                        // Item is selected   else       
                        //Item is not selected by user   
                            intCounter = intCounter + 1;

                    }
                }
            }

        });

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input type="button" value="Export Excel" id="btnExportExcel" />
        <input type="button" value="Export PDF" id="btnExportPDF" />
    </div>
    <asp:CheckBoxList ID="CheckBoxList1" runat="server">
        <asp:ListItem Value="A">ColdFusion</asp:ListItem>
        <asp:ListItem Value="SA">PHP</asp:ListItem>
        <asp:ListItem Value="AD">JSP</asp:ListItem>
        <asp:ListItem Value="AF">Asp.Net</asp:ListItem>
        <asp:ListItem Value="AB">Flex</asp:ListItem>
    </asp:CheckBoxList>
    <asp:Panel ID="Panel1" runat="server" Enabled="false">
       <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button" />
    </asp:Panel>
 
    </form>
</body>
</html>
